<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>俄罗斯方块</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="game-container">
        <div class="game-wrapper">
            <div class="game-info">
                <div class="stats">
                    <div class="score">分数: <span id="score">0</span></div>
                    <div class="level">等级: <span id="level">1</span></div>
                    <div class="lines">行数: <span id="lines">0</span></div>
                    <div class="time">时间: <span id="time">00:00</span></div>
                </div>
                
                <div class="next-piece-container">
                    <p>下一个:</p>
                    <div id="next-piece-display"></div>
                </div>
            </div>
            
            <div class="game-area">
                <div class="game-border">
                    <div class="game-screen">
                        <canvas id="tetris"></canvas>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="controls-container">
            <div class="game-buttons">
                <button id="start-btn">开始</button>
                <button id="pause-btn">暂停</button>
                <button id="restart-btn">重新开始</button>
            </div>
            
            <div class="retro-gamepad">
                <div class="dpad">
                    <button id="left-btn" class="dpad-left">←</button>
                    <button id="up-btn" class="dpad-up">↑</button>
                    <button id="right-btn" class="dpad-right">→</button>
                    <button id="down-btn" class="dpad-down">↓</button>
                    <div class="dpad-center"></div>
                </div>
                
                <div class="action-buttons">
                    <button id="rotate-btn" class="action-btn">A</button>
                    <button id="drop-btn" class="action-btn">B</button>
                </div>
            </div>
        </div>
    </div>
    <script src="tetris.js"></script>
</body>
</html>